package org.rm.test;

import java.io.PrintStream;

public class Sysout {
    
    private static PrintStream output;
    private static int lineSize;
    private static String line;
    
    static {
        output = System.out;
        lineSize = 80;
        StringBuilder sb = new StringBuilder();
        sb.append("|");
        for(int i=2;i<lineSize;i++)
            sb.append("-");
        sb.append("|");
        line = sb.toString();
    }
    
    public static void println(String msg) {
        output.println(line);        
        int left = msg.length() / 2;
        int right = msg.length() - left;
        int middle = lineSize / 2;
        String printLine = line.substring(0, (middle-left)) + msg + line.substring(middle+right);
        output.println(printLine);
        output.println(line);
    }

}
